<script setup lang="ts">
import {ref} from "vue";
import ReCol from "@/components/ReCol";

import {KctzFormProps} from "./ts/types";

const props = withDefaults(defineProps<KctzFormProps>(), {
  formInline: () => ({
    id: undefined,
    reportDate: undefined,
    loadingTime: undefined,
    dumpTime: undefined,
    classNo: undefined,
    truckName: undefined,
    truckId: undefined,
    driverName: undefined,
    driverId: undefined,
    totalVc: undefined,
    totalOutput: undefined,
  })
});

const ruleFormRefKctz = ref();
const newFormInlineKctz = ref(props.formInline);

function getRefKctz() {
  return ruleFormRefKctz.value;
}

defineExpose({getRefKctz});
</script>

<template>
  <el-form
      ref="ruleFormRefKctz"
      :model="newFormInlineKctz"
      :rules="ruleFormRefKctz"
      label-width="82px"
  >
    <el-row :gutter="30">
      <re-col :value="12" :xs="24" :sm="24">
        <el-form-item label="主键" prop="id">
          <el-input
              v-model="newFormInlineKctz.id"
              clearable
              placeholder="请输入主键"
          />
        </el-form-item>
      </re-col>
      <re-col :value="12" :xs="24" :sm="24">
        <el-form-item label="日期" prop="reportDate ">
          <el-input
              v-model="newFormInlineKctz.reportDate "
              clearable
              placeholder="请输入日期"
          />
        </el-form-item>
      </re-col>
      <re-col :value="12" :xs="24" :sm="24">
        <el-form-item label="装载时间" prop="loadingTime">
          <el-input
              v-model="newFormInlineKctz.loadingTime"
              clearable
              placeholder="请输入装载时间"
          />
        </el-form-item>
      </re-col>
      <re-col :value="12" :xs="24" :sm="24">
        <el-form-item label="卸矿时间" prop="dumpTime">
          <el-input
              v-model="newFormInlineKctz.dumpTime"
              clearable
              placeholder="请输入卸矿时间"
          />
        </el-form-item>
      </re-col>
      <re-col :value="12" :xs="24" :sm="24">
        <el-form-item label="班次（白班，夜班）" prop="classNo">
          <el-input
              v-model="newFormInlineKctz.classNo"
              clearable
              placeholder="请输入班次（白班，夜班）"
          />
        </el-form-item>
      </re-col>
      <re-col :value="12" :xs="24" :sm="24">
        <el-form-item label="卡车" prop="truckName ">
          <el-input
              v-model="newFormInlineKctz.truckName "
              clearable
              placeholder="请输入卡车"
          />
        </el-form-item>
      </re-col>
      <re-col :value="12" :xs="24" :sm="24">
        <el-form-item label="卡车id" prop="truckId">
          <el-input
              v-model="newFormInlineKctz.truckId"
              clearable
              placeholder="请输入卡车id"
          />
        </el-form-item>
      </re-col>
      <re-col :value="12" :xs="24" :sm="24">
        <el-form-item label="司机" prop="driverName ">
          <el-input
              v-model="newFormInlineKctz.driverName "
              clearable
              placeholder="请输入司机"
          />
        </el-form-item>
      </re-col>
      <re-col :value="12" :xs="24" :sm="24">
        <el-form-item label="司机id" prop="driverId">
          <el-input
              v-model="newFormInlineKctz.driverId"
              clearable
              placeholder="请输入司机id"
          />
        </el-form-item>
      </re-col>
      <re-col :value="12" :xs="24" :sm="24">
        <el-form-item label="总车数" prop="totalVc">
          <el-input
              v-model="newFormInlineKctz.totalVc"
              clearable
              placeholder="请输入总车数"
          />
        </el-form-item>
      </re-col>
      <re-col :value="12" :xs="24" :sm="24">
        <el-form-item label="总产量" prop="totalOutput">
          <el-input
              v-model="newFormInlineKctz.totalOutput"
              clearable
              placeholder="请输入总产量"
          />
        </el-form-item>
      </re-col>
    </el-row>
  </el-form>
</template>
